use crate::utilty::create_dir;
//ok
pub struct Jdocker{
    base_dir: String,
    image_dir: String,
    container_dir: String,
    runtime_dir: String,
    tmp_dir: String,
    db_dir: String,
}
impl Jdocker{
    pub fn new()->Self{
        Self{
            base_dir: "/var/jdocker".to_string(),
            image_dir: "/var/jdocker/image_dir".to_string(),
            container_dir: "/var/jdocker/containers_dir".to_string(),
            runtime_dir: "/var/jdocker/runtime_dir".to_string(),
            tmp_dir: "/var/jdocker/tmp_dir".to_string(),
            db_dir: "/var/jdocker/db_dir".to_string(),
        }
    }
    pub fn home_dir(&self) {
        create_dir(self.base_dir.clone());
        create_dir(self.image_dir.clone());
        create_dir(self.container_dir.clone());
        create_dir(self.runtime_dir.clone());
        create_dir(self.tmp_dir.clone());
        create_dir(self.db_dir.clone());

    }
    pub fn get_image_dir(&self)->String{
        self.image_dir.clone()
    }
    pub fn get_container_dir(&self)->String{
        self.container_dir.clone()
    }
    pub fn get_runtime_dir(&self)->String{
        self.runtime_dir.clone()
    }
    pub fn get_tmp_dir(&self)->String{
        self.tmp_dir.clone()
    }
    pub fn get_db_dir(&self)->String{
        self.db_dir.clone()
    }
    pub fn get_base_dir(&self)->String{
        self.base_dir.clone()
    }

}



